import request from '@/utils/request'


// startTask, verify, uploadChunks, mergeRequest, finishTask
// export function getKnowledgeTree (query) {
//   return request({
//     url: '/knowledge/getClassifyTree',
//     method: 'get',
//     params: query
//   })
// }


export function uploadStart (data) {
  return request({
    url: '/web/upload/start',
    method: 'post',
    data: data
  })
}

export function uploadVerify (data) {
  return request({
    url: '/web/upload/verify',
    method: 'post',
    data: data
  })
}
export function uploadChunk (data) {
  return request({
    url: '/web/upload/chunk',
    method: 'post',
    data: data
  })
}

export function uploadMerge (data) {
  return request({
    url: '/web/upload/merge',
    method: 'post',
    data: data,
    timeout: 3000000
  })
}


export function uploadFinish (data) {
  return request({
    url: '/web/upload/finish',
    method: 'post',
    data: data,
    timeout: 3000000
  })
}

export function getUploadStatus (data) {
  return request({
    url: '/web/upload/status',
    method: 'post',
    data: data
  })
}

export function uploadPrecheck (data) {
  return request({
    url: '/web/upload/precheck',
    method: 'post',
    data: data
  })
}

export function uploadMaterialview (id) {
  return request({
    url: '/web/upload/materialview?fileId=' + id,
    method: 'get',
  })
}

export function tctaskSave (data) {
  return request({
    url: '/web/tctask/save',
    method: 'post',
    data: data
  })
}

export function uploadTaskList (data) {
  return request({
    url: '/web/upload/task/list',
    method: 'post',
    data: data
  })
}

export function uploadTasRemove (data) {
  return request({
    url: '/web/upload/task/remove',
    method: 'post',
    data: data
  })
}

export function uploadTaSend (data) {
  return request({
    url: '/web/upload/task/send',
    method: 'post',
    data: data
  })
}

export function uploadMatTree (data) {
  return request({
    url: '/web/upload/mattree',
    method: 'post',
    data: data
  })
}

export function dlxGetparameter (data) {
  return request({
    url: `/web/upload/dlx/getparameter`,
    method: 'get',
    params: data
  })
}

export function dlxSaveparameter (data) {
  return request({
    url: `/web/upload/dlx/saveparameter`,
    method: 'post',
    data: data
  })
}

export function conditionLis (data) {
  return request({
    url: `/web/upload/conditionList`,
    method: 'get',
    params: data
  })
}

export function channelListByCondition (data) {
  return request({
    url: `/web/upload/channelListByCondition`,
    method: 'post',
    data: data
  })
}

export function uploadSetline (data) {
  return request({
    url: `/web/upload/setline?dataId=${data.dataId}&lineId=${data.lineId}`,
    method: 'post',
  })
}
